/**
 * 收藏夹模型
 * 
*/
module.exports = (sequelize, Sequelize) => {
    return sequelize.define("favorite", {
        id: {
            type: Sequelize.UUID,
            notNull: true,
            primaryKey: true,
            defaultValue: Sequelize.UUIDV4,
        },
        type: {
            type: Sequelize.INTEGER,
            notNull: true,
            notEmpty: true,
            comment: '网站类别',
        },
        typeName: {
            type: Sequelize.STRING,
            notNull: true,
            notEmpty: true,
            comment: '网站类别名称',
        },
        name: {
            type: Sequelize.STRING,
            notNull: true,
            notEmpty: true,
            comment: '网站名称'
        },
        cover: {
            type: Sequelize.TEXT("long"),
            comment: '网站图标',
        },
        url: {
            type: Sequelize.STRING,
            notNull: true,
            notEmpty: true,
            comment: '网站地址'
        },
        desc: {
            type: Sequelize.STRING,
            comment: '网站简介',
        },
        state: {
            type: Sequelize.BOOLEAN,
            comment: '收藏状态',
            defaultValue: true
        }
    })
}